home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
039a
/
uw201.zip
/
ENQHELP.DOC
< prev
next >
Wrap
Text File
|
1991-10-12
|
15KB
|
289 lines
The EnQue Hypertext Help Engine
(C) 1991 EnQue Software
EnQue Software
Route 1, Box 116C
Pleasant Hill, MO 64080
24-hour BBS : (816) 353-0991
Fax / Voice : (816) 329-6670
Voice : (816) 353-5561
_____________________________________________________________________________
Using the EnQue Hypertext Help Engine
The help engine is very easy to use due to its employment of EnQue's
new user-interface-construction toolkit, InTUItion. The help may be used
with either the keyboard or mouse. The help files may consist of simply
ASCII files or have imbedded commands that allow for color control,
hypertext links, sound, etc. If the files exist in the current
directory, that file is accessed, otherwise, the help engine looks in the
path set by the environment variable ENQHELP. To set this, add a line to
your autoexec.bat file that looks something like this:
"set ENQHELP=C:\BORLANDC\ENQUE"
To invoke the help engine, type
"enqhelp filename mode search [sx sy ex ey]"
where the filename is the first file the help engine should access. The
mode parameter tells the help engine to either read the word under the
flashing cursor (1) or use the "search" keyword (0). If you are running
help within Borland's compilers, setting help up as a Transfer program
allows you to pull help up for UltraWin/InTUItion functions. See
"Setting up a transfer program" below. The parameters sx, sy, ex, and ey
are screen coordinates for the window that will be used by help. Default
values can be used (1, 4, 78, 20) if no parameters are specified. The
help window must be either wider than 64 characters, or taller than 14.
This is to allow for the dialog interface buttons and sliders. If the
values are out of range or the file does not exist, the help engine will
return.
Once active, you can scroll around the help file much like an editor.
UP, DOWN, LEFT, RIGHT, HOME, END, PgUp, PgDn, Ctrl-PgUp, Ctrl-PgDn allow
you to move around the file. If the file is wider than the help window
you can scroll horizontally as well as vertically. The buttons operate as
follows.
Search - [Alt-S] pulls up a dialog to allow you to search for a specific
word or phrase.
Repeat - [Alt-R] finds the next occurrence specified by Search.
<<< - [Shift-Tab] key moves to the previous keyword.
>>> - [Tab] moves to the next keyword.
Previous - [Alt-P] moves to the previously active keyword.
Index - [Alt-I] moves to the original starting place.
Quit - [Alt-Q] quits the help program.
If you are using a mouse, clicking on the button, sliders, close box,
(upper left corner), or keyword will activate the function.
To move to a keyword, you can use the tab keys or cursor keys to move
to the desired word. The keyword will hilite. Pressing enter or double
clicking on this word will take you to additional information on this
topic. Pressing Alt-P (previous) will take you back one level.
To search for a specific word/phrase, press Alt-S or click on Search.
This pulls up a dialog box. To enter the word/phrase, press Alt-S again
or click on the string following the word Search. Type in the
word/phrase and press Alt-O or click on OK. The default search will
search forward from the current cursor location. The direction and scope
can be changed by clicking on the appropriate check box or pressing the
desired hot-key.
Forward - [Alt-F] sets the search direction to forward.
Backward - [Alt-B] sets the search direction to backwards.
From Csr - [Alt-R] search from current cursor position.
Global - [Alt-G] search from start of file.
Case - [Alt-C] if off, case is ignored.
Quit - [Alt-Q] abort the current search dialog.
OK - [Alt-O] accept parameters and find first word.
Thats basically it!
_____________________________________________________________________________
Setting up a Transfer Program
To use the help engine as a transfer program from the Borland
Compilers, edit the transfer parameters as normal (see the Borland
Documentation) and for the command line parameters be sure to type
$NOSWAP as the first command. An example for an EGA 43 row screen would
be "$NOSWAP uw_help0.hlp 1 1 20 78 40".
If you would like the help engine to "move" directly to the function
that your cursor points to, load the tiny TSR tckbd.com before entering
the compiler. This is a hook that allows the help engine to read the
word that the cursor points to and search for when invoked. It is a good
idea to call tckbd.com from you autoexec.bat. Note that the Borland
compiler required you to set up the transfer program for each project
file.
_____________________________________________________________________________
Creating Your Own Help Files
Overview:
The help commands are structured much like a "C" function call with a
few restrictions. The command must be preceded by a ` character, and no
white space is allowed within the command. All commands are stripped
from the help display. A line within the help text file can contain
multiple commands and can be up to 255 characters in length. Keep in
mind that the displayed width may be less since commands are stripped.
Also note that no commands are required; the help may simply consist of
ASCII text that is linefeed or carriage return/linefeed delimited. These
commands are designed to allow you to enhance your help files and add
powerful hypertext capabilities.
Since the help files are simply ASCII, they can be edited with
virtually any text editor. The help engine will accept and display the
extended character set if desired and your editor allows the inclusion of
these characters. This allows you to create borders, etc, within your
help files. The drawback to ASCII files is a small sacrifice in speed
when reading/parsing them. However, by keeping your help files
relatively small, (to conserve memory as much as for speed), this
drawback is all but unnoticable.
_____________________________________________________________________________
KEYWORD: `keyword(word,search string);
There are three forms of the keyword command. The first specifies the
actual keyword followed by a search string. Both the keyword and the
search string can consist of several words (up to 80 characters). In
this form, the search string must reside in the same file as the keyword
command. It can be located anywhere in the file and should be unique.
It is good practice to use a character or sequence of characters in the
search string that will not commonly occur in the text in order to assure
this uniqueness. For example:
`keyword(File System,/// The DOS File System);
Here we use three / to insure the uniqueness of the search string.
Note that the keyword and search string can be different.
The second form is like the first but include a modifier in front of
the search string. This modifier, enclosed in brackets, specifies the
file in which the search string exists. For example:
`keyword(DOS,[dos.hlp]/// DOS);
This works the same as the example above except that the file dos.hlp
will no be loaded into the help engine and the search string "/// DOS"
will be located.
The third form is similar to the other two in form but different in
action. When the user moves to this keyword and presses <Enter>, the
second parameter is used as a DOS command and executed. For example:
`keyword(DIR,{dir c:});
When selected, this keyword will execute the DOS command "dir c:".
This is useful for creating menus, shells, etc.
_____________________________________________________________________________
COLOR: `color(foreground string,background string);
There are a number of color control commands that allow you to
personalize your help files. Often, only one or two are used. The first
and most common is the color command. Two parameters specify the
foreground and background colors. For example `color(RED,LIGHTGRAY);
Sixteen colors are available for each. Knowledge of the PC text
attribute structure is recommended but not required. The colors are as
follows:
Normal High Intensity
------- --------------
0 BLACK 8 DARKGRAY
1 BLUE 9 LIGHTBLUE
2 GREEN 10 LIGHTGREEN
3 CYAN 11 LIGHTCYAN
4 RED 12 LIGHTRED
5 MAGENTA 13 LIGHTMAGENTA
6 BROWN 14 YELLOW
7 LIGHTGRAY 15 WHITE
The high intensity will cause the text to blink if used as the
background color unless the blink bit is disabled. In addition to these
16 colors, DEFAULT can be specified for either/both foreground or
background. This will restore the color to its default state. (As
specified by color_default or the program if color_default is not used)
For example if our default colors are WHITE on BLACK and we specify
`color(RED,BLACK); followed later by `color(DEFAULT,GREEN); we will then
have WHITE on GREEN.
_____________________________________________________________________________
CO: `co(foreground #,background #);
This command operates identically to color but is a short form version
and is preferable where many color commands are used. In this form we
specify the colors with their decimal value 0-15 instead of a much longer
text string. For example, instead of `color(LIGHTGRAY,GREEN); we would
have `co(7,2); If many commands exists in a file this saves both space
and time when the text is displayed, as the help engine does not have to
search for the color string. This also accepts default parameters but in
this form you simply use a ? i.e. `co(?,3); In addition, this form
allows you to completely exclude the parameters and restore the default
foreground and background with the simply call `co(); This is preferable
since it then allows you greater flexibility is changing the default
colors without having to search and replace all color commands that
restore the defaults.
_____________________________________________________________________________
CK: `ck(foreground #,background #);
This command is the same as co except that the first character
following the command is displayed in the attribute specified by the
color_first_char command (or the program if color_first_char is not
used). This is used internally by the help engine and is not normally
needed.
_____________________________________________________________________________
COLOR_DEFAULT: `color_default(foreground string,background string);
This command specifies the default foreground and background colors.
This command is not required unless the program default is to be
overidden. If it is used, it should be on the first line in the help
file.
_____________________________________________________________________________
COLOR_FIRST_CHAR: `color_first_char(foreground string,background string);
This command specifies the color of the first character of all
keywords. This command is not required unless the program default is to
be overidden. If it is used, it should be on the first line in the help
file.
_____________________________________________________________________________
COLOR_HILITE: `color_hilite(foreground string,background string);
This command specifies the color of the keyword when the cursor selects
it. This command is not required unless the program default is to be
overidden. If it is used, it should be on the first line in the help
file.
_____________________________________________________________________________
COLOR_KEYWORD: `color_keyword(foreground string,background string);
This command specifies the color of the keyword itself. This command is
not required unless the program default is to be overidden. If it is
used, it should be on the first line in the help file.
_____________________________________________________________________________
SOUND: `sound(frequency,duration);
This routine causes the speaker to sound at the desired frequency for
the specified duration in clock ticks (91/second) when this line is
displayed. It is useful specifying the end of file and other important
segments within the help file.
_____________________________________________________________________________
DELAY: `delay(duration);
This routine causes the program to pause for the specified duration in
clock ticks (91/second) when this line is displayed.
_____________________________________________________________________________
DOS: `dos(command line);
This routine causes the DOS program to be executed when the line
containing this command is displayed. Note that this is different from
the DOS command within a keyword, as this occurs on display, and the
keyword version only occurs if the user selects the keyword and presses
<Enter>.
_____________________________________________________________________________
BLINK: `blink(state); (EGA/VGA only)
This routine turns the blink enable bit on or off depending on "state".
To disable blinking, use 0 , to enable, use 1. Turning this bit off
allows all 256 possible color combinations to be used without the high
intensity background colors blinking. If this function is used, it
should be on the first line in the help file.
_____________________________________________________________________________
FONT: `font(fontname,block); (EGA/VGA only)
This routine loads the desired font into the specified "block". Block
0 is the primary font, block 1 is the font selected by usig the high
intensisty colors. (See UltraWin documentation for more details). If
this function is used, it should be on the first line in the help file.
Once the font command is encountered, it is "disable" so that each time
the line is displayed the font will not be reloaded and the screen reset.
_____________________________________________________________________________
TAB: `tab(value);
This routine sets the tab size for the given file. The default value
is 2. If this function is used, it should be on the first line in the
help file. (Or before any tabs occur).